<html>
<head><meta charset="utf-8"><title>Existing MIR-opts &amp; documentation · t-compiler/wg-mir-opt · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/index.html">t-compiler/wg-mir-opt</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Existing.20MIR-opts.20.26.20documentation.html">Existing MIR-opts &amp; documentation</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="195446357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Existing%20MIR-opts%20%26%20documentation/near/195446357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Félix Fischer <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Existing.20MIR-opts.20.26.20documentation.html#195446357">(Apr 27 2020 at 17:01)</a>:</h4>
<p>Hellu all. I'd like to know if we have a list of the mir-opts that have been implemented, and if we have written down at what state they're in. I'd like to document all of this information, and try to give an overview of:</p>
<ol>
<li>Where we're at in each topic (e.g. "const-prop (...) isn't yet aware of control flow, but it propagates locals restricted to their containing blocks)". "copy prop needs more tests". "X is working on optimizing their NRVO implementation"</li>
<li>What do the transforms do.</li>
<li>What is the complexity of the transforms (time and memory)</li>
<li>Explain for each transform, why it is (or should be) sound.</li>
</ol>



<a name="195469745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Existing%20MIR-opts%20%26%20documentation/near/195469745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Existing.20MIR-opts.20.26.20documentation.html#195469745">(Apr 27 2020 at 20:18)</a>:</h4>
<p>I'm not aware of where that might be. I think there is a very small amount of documentation in the rustc dev guide which would probably be the ideal place to flesh that kind of content out.</p>



<a name="195499920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Existing%20MIR-opts%20%26%20documentation/near/195499920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Félix Fischer <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Existing.20MIR-opts.20.26.20documentation.html#195499920">(Apr 28 2020 at 04:13)</a>:</h4>
<p>Indeed, there is a little bit of documentation on them: <a href="https://rustc-dev-guide.rust-lang.org/mir/optimizations.html" title="https://rustc-dev-guide.rust-lang.org/mir/optimizations.html">https://rustc-dev-guide.rust-lang.org/mir/optimizations.html</a><br>
It sounds like a good place to start going deeper into it, if it doesn't exist anywhere else :)</p>



<a name="195500015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Existing%20MIR-opts%20%26%20documentation/near/195500015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Félix Fischer <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Existing.20MIR-opts.20.26.20documentation.html#195500015">(Apr 28 2020 at 04:15)</a>:</h4>
<p>The <code>#implementors</code> documentation also seems like a good place to put in some docs maybe, in the form of doc comments: <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/transform/trait.MirPass.html#implementors" title="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/transform/trait.MirPass.html#implementors">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/transform/trait.MirPass.html#implementors</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>